package com.mowh.gof23.behavioral.patterns.template.method;

/**
 * @author mowh1gd
 * @create 2023/10/20 14:21
 */
public class CharDisplay extends AbstractDisplay{
    private char aChar;

    public CharDisplay(char aChar) {
        this.aChar = aChar;
    }

    @Override
    public void open() {
        System.out.print("<<");
    }

    @Override
    public void print() {
        System.out.print(aChar);
    }

    @Override
    public void close() {
        System.out.println(">>");
    }
}
